package com.zhongke.cotrun.model.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zhongke.cotrun.model.validator.UserValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@ApiModel(value = "企业用户基本信息表单")
public class UserInforCompany extends UserInfo {
    @NotNull(message = "id不能为空", groups = {UserValidator.UpDate.class})
    @ApiModelProperty(value = "id号（修改时必填）", example = "1")

    private Long companyId;
    //单位名称
    @ApiModelProperty(value = "企业用户的单位名称,企业用户注册时候必填字段")
    @NotBlank(message = "单位名称不能为空",groups = {UserValidator.InSet.class})
    private String companyName;//单位名称

    @ApiModelProperty(value = "企业用户的单位信用代码,企业用户注册时候必填字段")
    @NotBlank(message = "单位信用代码不能为空",groups = {UserValidator.InSet.class})
    private String companyCode;//单位信用代码

    @ApiModelProperty(value = "单位类型 单位类型1 私企 2国企 3混合 4外资", example = "1")
    @NotNull(message = "单位类型不能为空",groups = {UserValidator.InSet.class})
    private String companyType;//单位类型单位类型1 私企 2国企 3混合 4外资

    @NotBlank(message = "营业执照不能为空",groups ={UserValidator.InSet.class,UserValidator.UpDate.class} )
    @ApiModelProperty(value = "营业执照不能为空（添加时候必填）")
    private String businessLicense;//营业执照

    @NotNull(message = "公司简介不能为空", groups = {UserValidator.InSet.class,UserValidator.UpDate.class})
    @ApiModelProperty(value = "公司简介（添加时候必填）")
    private String companyProviders;//公司简介

    @NotNull(message = "服务商简介不能为空", groups = {UserValidator.UpDate.class})
    @ApiModelProperty(value = "服务商简介（添加时候必填）")
    private String serviceProviders;//公司简介

    @NotNull(message = "公司邮箱不能为空", groups = {UserValidator.InSet.class,UserValidator.UpDate.class})
    @ApiModelProperty(value = "公司邮箱（添加时候必填）")
    private String companyEmail;//公司邮箱

    @ApiModelProperty(value = "公司logo",required = false)
    private String companyLogo;//公司logo

    private Integer companyProvince;

    private Integer companyCity;

    @ApiModelProperty(value = "备注",required = false)
    private String remarks;

    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditTime;

    @ApiModelProperty(value = "审核状态 0:待审核,1:审核通过,2审核驳回",example = "0")
    private Integer auditStatus;

    @ApiModelProperty(value = "审核人员")
    private String auditUser;

    @ApiModelProperty(value = "审批意见")
    private String auditOpinion;
}
